#include <iostream>
#include <queue>
#include <stack>
using namespace std;

int isKeith(long long target) {
    queue<long long> digits;
    stack<long long> initStack;
    long long goal = target;
    long long sum = 0;
    // 开始准备，添加所有数位
    while (target != 0) {
        initStack.push(target % 10);
        sum += target % 10;
        target /= 10;
    }
    while (!initStack.empty()) {
        digits.push(initStack.top());
        initStack.pop();
    }
    // 遍历开始
    while (sum <= goal) {
        if (sum == goal) { return 1; }
        long long currD = digits.front();
        long long currE = sum;
        digits.pop();
        sum = sum - currD + currE;
        digits.push(currE);
    }
    return 0;
}

int main() {
    long long target;
    cin >> target;
    if (isKeith(target)) {
        cout << "Yes";
    }
    else {
        cout << "No";
    }
    return 0;
}